package com.bruceliu.mapper;

import com.bruceliu.bean.Food;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @BelongsProject: RestaurantSystem
 * @BelongsPackage: com.bruceliu.mapper
 * @Author: bruceliu
 * @QQ:1241488705
 * @CreateTime: 2020-02-29 19:47
 * @Description: TODO
 */
@Mapper
public interface FoodMapper {

    /**
     * 01-条件查询数目
     * @param food
     * @return
     */
    public int totalCount(Food food);

    /**
     * 02-查询每页的数据
     * @return
     */
    public List<Food> getFoods(Map<String,Object> map);

    /**
     * 03-新增菜品
     * @param food
     * @return
     */
    public int addFood(Food food);

    /**
     * 04-根据ID查询对象
     * @param id
     * @return
     */
    public Food getById(int id);

    /**
     * 05-更新菜品
     * @return
     */
    public int updateFood(Food food);


    /**
     * 06-删除
     * @param id
     * @return
     */
    public int deleteFood(int id);

    /**
     * 点餐页面
     * @return
     */
    public int menu_totalCount(Map<String,Object> map);

    /**
     * 点餐页面
     * @return
     */
    public List<Food> menu_getFoods(Map<String,Object> map);
}
